package com.lovo.homework0201.dao;


import com.lovo.homework0201.entity.UserPowerEntity;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;


public interface IUserPowerDao extends CrudRepository<UserPowerEntity, Long> {
    @Query("select up from UserPowerEntity up where up.user.userId =?1")
    List<UserPowerEntity> findAllByUserAndPower(long userId);
}
